using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LockBlock : MonoBehaviour
{
    public int getNum;
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Ball")
        {
            getNum++;
        }
    }
    void Update()
    {
        if (getNum >= 10)
        {
            Destroy(this.gameObject);
        }
    }
}
